Help Index
WinCMD 4.2 Index

WinCMD Credits

Shareware

WinCMD Overview

WinCMD:

AutoWin	Automatic startup execution.

Batch Files	DOS Batch Files.

Commands	Commands Available.

Editing	Edit the command line.

Networks	Network use.

Process Control	Control of Multitasking.

Programming	Using other programs with WinCMD.

Redirection	Redirecting command output.

Run Dialog	File Search dialog.

Set Font	Set Operating Font dialog.

Toolbar	Toolbar use.

Toolbar API	Toolbar Programming.


Command  Index
Commands

alias	Rename a command.

attrib	Set a file attribute.

bg	Put the command shell into the background.

beep	Beep.

cd	Change into the specified directory.

cdd	Change into the specified drive and directory.

chdir	Change into the specified directory.

choice	Enter a batch file choice.

cls	Clear the display buffer.

copy	Copy a file.

del	Erase a file.

deltree	Erase a subdirectory and all subdirectories in it.

describe	Describe a file.

dir	List a specified disk directory.

dirs	List the directory stack.

echo	Echo data to the display.

erase	Erase a file.

exit	Exit the program.

fg	Bring the listed process to the foreground.

for	Do a loop with a series of keys.

free	List the remaining space on the specified disk drive.

goto	Go to a label. [Batch File]

history	Display the command history.

if	Execute a command conditionally. [Batch File]

jobs	List all processes started by WinCMD.

kill	Stop the listed process.

loadhigh	This is for DOS only, it is ignored in WinCMD.

logoff	Exit windows.

md	Make the specified directory.

mem	Show remaining Memory.

mkdir	Make the specified directory.

netadd	Add a network drive.

netcaps	Show Network Specifications.

netconn	Show Network Connections.

netfree	Show Unused Network Connections.

netlist	List connected network drives.

netlogon	Log on to a Server.

netlogoff	Log off of a Server.

netprivate	Remove sharing a Network Directory.

netshare	Share a Directory on the Network.

netsub	Remove a network drive.

path	Set the path environment.

pause	Wait for a key to be pressed.

popd	Pop a pushed directory.

prompt	Set the prompt environment.

ps	List the current processes.

pushd	Push the current directory.

rd	Remove the specified directory.

rename	Rename or Move a file.

ren	Rename or Move a file.

replace	Replace/Add a file.

rmdir	Remove the specified directory.

set	List or set the environment.

setdos	List or change the shell environment.

unalias	Restore a renamed command.

unset	Remove the environment variable.

ver	Show WinCMD version.

which	Show location of named command.


WinCMD GSH Copyright © 1994

Shareware Notice

WinCMD has taken many, many years to develop, and with the major improvements in version 4, is now a shareware product.  Use freely for 30 days, and if you like it, I would like a donation of $10 US for each copy used.  In return, I will notify you of any major changes in the future.

For a donation of $15, I will mail you a full disk version.

Send To:

Erik H Gawtry

13588 Ferris Avenue

Apple Valley, MN 55124-8136

This is a fully operational version, there are no greyed out features.


WinCMD GSH Copyright © 1994

Overview

WinCMD is a CLI (Command Line Interface) for Windows 3.1 and Windows for Workgroups 3.1 and 3.11.  It closely emulates Norton's NDOS command shell, which is related to the 4DOS shell.  It includes, however, several commands that are special for Windows process control.  These are modeled after the UNIX CSh commands.

WinCMD is a superset on COMMAND.COM, minus, of course, the DOS 5 and 6 specific commands such as LoadHigh.


WinCMD GSH Copyright © 1994

Version 4 for Windows 3.1 and Windows for Workgroups 3.1, 3.11

Software Engineer:

Erik H. Gawtry

Testing Engineer:

Mark Nadeau

Made in the United States of America


AUTOWIN.BAT

WinCMD will, upon startup, search the root directory of the drive containing the Windows directory (eg. "C:\" if windows is in "C:\WINDOWS") for the file called AUTOWIN.BAT.  If found, WinCMD will execute this file before showing the first command line.  This is useful for setting commonly used alias' or settings.  It is not necessary for the windows directory to be "C:\WINDOWS".

Example:

alias d dir

alias c cls

alias edit notepad


Batch Files

WinCMD will execute DOS batch files.  The following batch commands are supported:

beep	Beep.

choice	Enter a batch file choice.

for	Do a loop with a series of keys.

goto	Go to a label. [Batch File Only]

if	Execute a command conditionally. [Batch File Only]

WinCMD will execute Batch Files with the BTM extension as well as the BAT extension.


Command Line Editing
Command Line

To change the command line:

Click and highlight the area to edit.

Use standard command syntax:

F1	Help

F3	Duplicate the last command line from the current cursor position.

Up/Down	Choose a previous command.

Ctrl <-	Back up a word.

Ctrl ->	Advance a word.

End	Go to the end of the command line.

Esc	Clear the command line.

Home	Go to the beginning of the command line.

To use the special UNIX style background command execution, terminate the command line with an & (ampersand).  The command will execute in the background (minimized), and WinCMD will immediately return the next prompt.  To execute a program maximized, terminate the command line with a ^ (caret).

Note on commands:  If the command is not to be recorded in the shell history, place an '@' (ampersand) before the command.  For example:

@echo This is a test.

The command will not appear on the command line or be recorded in the history, but it will be executed.  This is useful for commands that expand the standard WinCMD command set, or for other programs to use WinCMD's advanced program and batch execution routines.  This mode works for both manual command line entry and with the DDE commands.

The @ mode is used on startup of WinCMD to automatically execute the file "AUTOWIN.BAT" if it is found in the root directory of the drive containing the "\WINDOWS" directory.

To change to another drive or to an assigned network device, enter the drive letter followed by a colon.  For example, to change to drive A:

C:\> A:

A:\>

See Also:  CDD


Networking Overview
Network

WinCMD contains full support for Networks and Windows for Workgroups.  The following commands are available:

netadd	Add a network drive.

netcaps	Show Network Specifications.

netconn	Show Network Connections.

netfree	Show Unused Network Connections.

netlist	List connected network drives.

netlogon	Log on to a Server.

netlogoff	Log off of a Server.

netprivate	Remove sharing a Network Directory.

netshare	Share a Directory on the Network.

netsub	Remove a network drive.

To Show connect and disconnect boxes similar to File Managers, type netadd or netsub by itself.

Network Names

Each shared resource in a network has a unique network name. A network name consists of a computer name and a share (or domain) name having the following Syntax:

\\computername\sharename

In this format, sharename specifies the name of a shared directory or domain; computername must be a valid name for a computer or server in the network. Users define the share names for these shared resources when they share the resource. Applications must use the names to connect to and use the resource. The following are examples of network names:

\\COMPUTER1\ACAD

\\COMPUTER2\WINWORD

When working with shared directories or domain, applications can combine a network name and path to create a Universal Naming Convention (UNC) name. A UNC name uniquely identifies a file or directory in a shared directory for a given computer. The following is an example of a UNC name:

\\COMPUTER1\TMP\README.TXT


Command Line Redirection
Redirection

Sends output to a file or printer instead of to the screen.

Use standard command syntax, and follow it by a > and either a filename or PRN for the default printer.

For example:

C:\>echo Howdy! > prn

C:\>

The command will not produce any screen output, and will print the word "Howdy!" on the default printer.

C:\>echo Cats are delicious and nutritious! > myfile.txt

C:\>

The command will not produce any screen output, and will create the file "myfile.txt" and put the string "Cats are delicious and nutritious" in it.

C:\>dir > prn

C:\>

The command will not produce any screen output, and will print the current directory on the default printer.

Note: The printer will always form feed (eject the page) after printing, no matter how little is printed.  This is internal to the Windows device driver and is not changable.


Process Control
Process (Task) Control

WinCMD contains a UNIX like implementation of process control.  This allows WinCMD to control all of the other programs that are currently operating.  The following commands are supported:

bg	Put the command shell into the background.

fg	Bring the listed process to the foreground.

jobs	List all processes started by WinCMD.

kill	Stop the listed process.

ps	List the current processes.

When a process started by WinCMD exits, the exit status is shown on the WinCMD screen, similar to UNIX commands.  This may be disabled using setdos.


Shell Programming
Programming

WinCMD contains a full implementation of the Window's Dynamic Data Exchange cold-link format.  Any program may send either a string to display in WinCMD, or else send a command to execute.

To send a string:

DDEInitiate(appname="WinCMD", appmode="");

DDEPoke(appitem="line", appstring=". . . . . ");

DDETerminate();

To send a command:

DDEInitiate(appname="WinCMD", appmode="");

DDECommand(appcommand=". . . . . ");

DDETerminate();

Replace the Ellipsis (. . . . .) with the string or command wanted.

For example, the following Word Macro will write "This is a test" on the WinCMD command line.

Start Macro

DdeRef = DDEInitiate("WinCmd", "")

DDEPoke DdeRef, "line", "This is a test"

DDETerminate DdeRef

End Macro

WinCMD supports the standard DDE interface.  DDEML is only supported in DDE compatibility mode.


Run Dialog
Run

For making finding files easier, WinCMD has a file search and execute box.  This dialog box follows standard windows file box convention.

Press F10 to activate the Run dialog box.

For Example:


Set Font Dialog
Set Font

WinCMD allows the setting of the display font.

Press Alt+Space to activate the System menu, then choose Set Font for the Font dialog box.  Choose the default (system) font, or a custom font.

For Example:


Toolbar Display
Toolbar

A group of buttons along the top of the WinCMD window that call up the function dialog boxes.

Click on the Button Wanted.

See Also: setdos, toolbar api

For Example:

Default Buttons:

About WinCMD

Set File Attributes

Copy a File

Directory

Set WinCMDs Font

Exit from WinCMD

Help

History of Commands

Kill a Process

List Processes

Rename a File

Run Dialog

Activate Screen Saver

Set Program Parameters


Toolbar API Overview
Toolbar API

Description

Programming interface to the Toolbar.

The Toolbar that is used by WinCMD can be used with any program that a toolbar is desired.  The following documents the API (Advanced Programming Interface) for the toolbar.

There are three functions that operate the toolbar:

GetToolbarHeight	Get Toolbar Height

CreateButtonBar	Create a New Toolbar

DestroyButtonBar	Remove the Toolbar

Usage

A toolbar is first created by CreateButtonBar.  This will return a handle to the button bar that may be used in a SendMessage function to add buttons.

At any time, whether there is a button bar created or not, the function GetToolbarHeight may be called to determine the height of the toolbar.

To remove the toolbar, DestroyButtonBar must be called.

Buttons or separators may be added by using the SendMessage function as follows:

To add a space between buttons:

SendMessage(HWND hWndToolbar, WM_TBADDBUTTON, TB_SEPARATOR, 0L);

To add a an new button:

SendMessage(HWND hWndToolbar, WM_TBADDBUTTON, TB_BUTTON, MAKELONG(int CommandID, HBITMAP hBitmap) );

Usually the HBITMAP parameter is gained using the LoadBitmap() function.

Bitmap resources are automatically removed when DestroyButtonBar is called.

Help descriptions may be used for the buttons by sending a WM_TBHELPBUTTON command to the toolbar.

SendMessage(hWndToolbar, WM_TBHELPBUTTON, IDM_MYFUNC, (LPARAM)(LPSTR)"MyFuncDescription");

These functions must be IMPORTED from the file WCTOOLS.DLL

For Borland C++ and Visual C++:

Run the IMPLIB utility on WCTOOLS.DLL and link the program with the file WCTOOLS.LIB.

Example

#include <windows.h>

#include <toolbar.h>	// File from Archive

HINSTANCE	hInst;	// Program Instance Handle

#define	ID_TOOLBAR	10	// Toolbar Screen ID (can be any number)

long FAR PASCAL WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)

{

static HWND	hWndToolbar;

switch( message ){

case WM_CREATE:

if( (hWndToolbar=CreateButtonBar(hWnd, ID_TOOLBAR)) == NULL )

MessageBox(NULL, "Toolbar Creation Error", NULL, MB_OK|MB_ICONEXCLAMATION);

SendMessage(hWndToolbar, WM_TBADDBUTTON, TB_BUTTON, MAKELONG(IDM_MYFUNC, LoadBitmap(hInst, "MyFuncBitmap")));

SendMessage(hWndToolbar, WM_TBADDBUTTON, TB_SEPARATOR, 0L);

SendMessage(hWndToolbar, WM_TBHELPBUTTON, IDM_MYFUNC, (LPARAM)(LPSTR)"MyFuncDescription");

return FALSE;

case WM_COMMAND:

switch( wParam ){

case IDM_MYFUNC:

// Do my Stuff Here

return FALSE;

}

break;

case WM_DESTROY:

if( hWndToolbar ) DestroyButtonBar(hWndToolbar);

return FALSE;

}

}

See Also: toolbar


Toolbar CreateButtonBar
CreateButtonBar

HWND WINAPI CreateButtonBar(hwndParent, iModuleID);

HWND	hwndParent;	/* Handle of Parent Window */

int	iModuleID;	/* Unique ID for toolbar */

The CreateButtonBar function creates a blank button bar at the top of the calling window.

Parameter	Meaning

hwndParent	Window Handle of the Calling (Parent) window.

iModuleID	A unique ID for the ButtonBar.  This ID value should not be used at any other point in the calling program.

Returns

If successful, CreateButtonBar returns a HWND pointer to be used to add buttons to the toolbar.  Otherwise, a NULL pointer is returned.

Comments

This function is exported from the file WCTOOLS.DLL.

See Also

 DestroyButtonBar


Toolbar DestroyButtonBar
DestroyButtonBar

void WINAPI DestroyButtonBar(hwndToolbar);

HWND	hwndToolbar;	/* Handle of Toolbar */

The DestroyButtonBar removes the button bar from the top of the window.

Parameter	Meaning

hwndToolbar	Handle of the Toolbar returned from CreateButtonBar.

Returns

DestroyButtonBar does not return a value.

Comments

This function is exported from the file WCTOOLS.DLL.

See Also

 CreateButtonBar


Toolbar GetToolbarHeight
GetToolbarHeight

int WINAPI GetToolbarHeight(void);

The GetToolbarHeight retrieves the height of the toolbar.

Returns

GetToolbarHeight returns the height of the toolbar (whether shown or not) in device units.

Comments

This function is exported from the file WCTOOLS.DLL.


Toolbar WM_TBADDBUTTON
WM_TBADDBUTTON

This message is sent to the Toolbar to add an item.

Parameter	Description

wParam	Specifies type of Item to Add

Value	Meaning

TB_SEPARATOR	Put a separator into the toolbar at the current point.

TB_BUTTON	Add a new Toolbar Button.

lParam	Values if wParam  = TB_BUTTON

MAKELONG( UINT mID,  HBITMAP hBitmap )

Word	Description

mID	Command Identifier

hBitmap	HBITMAP reference

Comments

This is defined in the header file "TOOLBAR.H".


Toolbar WM_TBHELPBUTTON
WM_TBHELPBUTTON

This message is sent to the Toolbar to add a description to an item.

Parameter	Description

wParam	Specifies Command Identifier of Item

lParam	Long Pointer to NULL Terminated Description String.  The string will be truncated to 16 characters.

Comments

This is defined in the header file "TOOLBAR.H".


alias Command
alias/unalias

To set, clear, and list changed commands.

Syntax:	alias [newcommand oldcommand]

Parameters:	newcommand

Specifies the new command to create.

oldcommand

Specifies what the new command will do.

Type alias to list the current alias'.

Type alias followed by a variable to set to change the current alias'.

Type unalias followed by a variable to erase  a current alias.

Example:

C:\> alias s set

C:\> s

PATH=C:\;C:\WINDOWS;C:\DOS

PROMPT=$p$g

cmdline=win wincmd

C:\> |


attrib Command
attrib

To change file attributes:

Syntax:	attrib ±[rhsa] filespec

Parameters:

Attribute	Action

+r	Add read-only attribute

+h	Add hidden attribute

+s	Add system attribute

+a	Add archive attribute

-r	Remove read-only attribute

-h	Remove hidden attribute

-s	Remove system attribute

-a	Remove archive attribute

Type attrib followed by the attribute change arguments, followed by the filename wanted.

Example:

C:\> attrib +r file.doc

C:\> |


beep Command
beep

Sound the default system beep:

Type beep.

Example:

C:\> beep

C:\> |


bg Command
bg

To put the WinCMD shell into the background:

Type bg.  WinCMD will minimize and pass focus to the next available program.

Example:

C:\> bg


cdd Command
cdd

To change to a different drive and directory:

Syntax:	cdd n :directory

Type cdd followed by the drive and directory wanted.

Example:

C:\> cdd b:\dos

B:\DOS> |


chdir Command
chdir/cd

To change to a different directory:

Syntax:	chdir newdirectory

Type chdir followed by the directory wanted.

Example:

C:\> chdir dos

C:\DOS> |


choice Command
choice

Allow selection of multiple items:

Syntax:	choice [/c[:]keys] [/n] [/s] [text]

Switches:

Parameter	Meaning

c	Give list of alternate keys (YN is the default)

n	No Prompt

s	Case Sensitive

text	Question to ask

Type choice.

Notice:  DOS 6 implements this as a external command.  To use the DOS 6 command alias "choice" to the DOS choice program.

Example:

C:\> choice

[Y/N]?


cls Command
cls

To clear the WinCMD window:

Type cls.

Example:

C:\> cls

C:\> |


copy Command
copy/expand

To copy files:

Syntax:	copy source [destination] [/z] [/s]

Switches:

Parameter	Meaning

z	Expand using Liv-Zimpel

s	Copy/Expand Subdirectoies

Type copy followed by the name of the file to copy, followed by the new filename or directory to copy to (optional).

If the Style is set to Verbose, then a window will appear and display the file copy statistics, otherwise it will display the source and destination file names.

If the /z flag is given, copy will automatically decompress the file as it copies using the Liv-Zimpel compression algorythm, if the souce file is compressed using this method.  This is similar to the DOS EXPAND command.

If the /s flag is given, subdirectories will be copied.

See Also: replace, rename, setdos

Note: Wildcards may be used.

Note: The Microsoft DOS COMPRESS utility is compatible with the decompression routines.

Example:

C:\> copy oldfile.doc newfile.doc

1 file copied.

C:\> |

If no parameters are given the following dialog box will appear and prompt for the wanted information.


erase Command
del/erase

To erase files:

Syntax:	erase filespec

Type erase followed by the name of the file to erase.

Example:

C:\> erase foo.bat

C:\> |


deltree Command
deltree

To erase files in and under a subdirectory:

Syntax:	deltree filespec

Type deltree followed by the name of the directory to erase recursively.

See Also: erase

Example:

C:\> REM This will erase Word for Windows from the hard disk

C:\> deltree winword

C:\> rmdir winword

C:\> |


describe Command
describe

Describes a file.  This will appear to the right of the directory listing of the file described.  This is fully compatible with the Norton Utilities® NDOS Shell and the 4DOS® Shell.

Syntax:	describe filespec ["description"]

Type describe followed by the name of the file to describe, followed by the description wanted.  If no description is given, a prompt will be given for a description.  If no description is wanted, leave the prompt blank.  Wildcards may be used.

Example:

C:\> describe autowin.bat "Files that execute when WinCMD starts"

C:\> |

If no parameter is given in quotes the following dialog box will appear and prompt for the wanted information.


dir Command
dir

To get a disk directory:

Syntax:	dir [/parameter] [filespec]

Type dir followed by a specific parameter (optional), followed by the specific filename wanted.  dir also uses the environment variable "dircmd" which is set to a parameter that is used each time the dir command is used.

Switches:

Parameter	Meaning

a	List all files (including hidden)

c	List capitalized

l	List in lower case

m	Do not list totals after the directory

ox	List sorted (o-x will reverse the sort)

od - Sort Date and Time

on - Sort Filename

os - Sort Size

ou - Unsort

p	List page by page (ESC to quit at the end of the page)

t	List attributes

w	List in wide format (5 columns)

Note: The disk serial number will only be seen if DOS 4 or above is used.

Example:

C:\> dir e: /t

     Volume in drive E is ENCARTA1994

     Device Type: CD-ROM

     Directory of E:\

encarta	<DIR>	9-30-93	00:00:00am ---D-

encyc94	<DIR>	9-30-93	00:00:00am ---D-

fonts	<DIR>	9-30-93	00:00:00am ---D-

mmcat	<DIR>	9-30-93	00:00:00am ---D-

msstp	<DIR>	9-30-93	00:00:00am ---D-

readme.wri	   32768	9-30-93	00:00:02am R----

setup.exe	   26736	9-30-93	00:00:02am R----

setup.lst	    1003	9-30-93	00:00:02am R----

    8 files    72795 bytes      86016 allocated

0 (0%)  bytes free

C:\> |


dirs command
dirs

To display the directory stack:

Type dirs.

See Also: pushd, popd

Example:

C:\> dirs

C:\WINDOWS

C:\DOS

C:\WINDOWS\SYSTEM

C:\> |


echo Command
echo

To echo a string to the screen:

Syntax:	echo echostring

Type echo followed by the string to write.

Example:

C:\> echo This is a test.

This is a test.

C:\> |


exit Command
exit

To exit the program:

Optional Parameters:

Windows	Exit from the Windows Operating System (NT logout).

Restart	Restart the Windows Operating System (NT logout).

Reboot	Reboot the computer.

Click the mouse on  [image] (the system menu), followed by Close.

Type Exit.

Shortcut Key:	Press Alt+F4.


fg Command
fg

To bring processes in to the foreground:

Syntax:	fg processID

Type fg followed by the process ID retrieved from ps.

Note: This will automatically remove input focus from the WinCMD shell.

Example:

C:\> ps

Process	Task ID	Name

-------	-------	-----

1252	0	(Desktop)

3852	2342	Kernel

14234	1435	WinCMD	(This)

8734	2567	Notepad - README.TXT

25332	2619	Program Manager

C:\> fg 8734


for Command
for

To execute a instruct with multiple variable parameters:

Syntax:	for %s  in (keys ) do command

Type for.  followed by a peudo-variable to use, then type in (key) do then a command to use with the peudo-variable inserted.

Example:

C:\WINDOWS> REM this will list all executables

C:\WINDOWS> for %s in (*.exe *.pif *.com) do echo %s

default.pif

dosprmpt.pif

calc.exe

control.exe

notepad.exe

progman.exe

win.com

wincmd4.exe

winfile.exe

write.exe

C:\WINDOWS> |


free Command
free

To display the disk label and the remaining disk space:

Syntax:	free [drive]

Type free.  If a different drive is desired, indicate the drive wanted.

Example:

C:\> free

     Volume in drive C is ENGINEER

     Serial Number 1234-ABCD

     Device Type: Hard Disk Drive (Fixed)

123934566 (23%)  bytes free

C:\> |


goto Command
goto

To go to a specific batch file label:

Syntax:	goto label

Type goto followed by the name of the label to go to in the batch file.

Example:

goto runfile

.

.

echo This line will not be used.

.

:runfile

.

echo This line will be used.

.

.


history command
history

To display the last 20 commands:

Type history.

Example:

C:\> history

1	cls

2	dir /w

3	notepad &

4	ps

5	history

C:\> |


if Command
if

To check for a conditional value:

Syntax:	if "param1"="param2" then operation

Type if followed by a specific condition, followed by a then followed by the operation.

Examples:

In a batch file, a % signifies a specific environment variable or a parameter that was passed to the batch file.  For instance:

C> MYBATCH Charlie Brown

will cause the batch file to put the word "Charlie" wherever the %1 is seen and "Brown" wherever the %2 is seen.  If a %path is seen then the path will be inserted at that point.  This also applies to any other environment variable.

To Test for conditionals:

if "%1"="Windows" then goto runfile

if "cat"<>"dog" then echo Cats are not dogs!

if "%1"="DOS" then command.com

if errorlevel 255 then goto tellerror


jobs Command
jobs

To list all WinCMD jobs:

Syntax:	jobs

Type jobs.

See Also: kill

Notes:

The Task ID is not used.

Example:

C:\> jobs

Process	Task ID	Name

-------	-------	------

[  1]	8734	notepad.exe readme.txt

[  2]	3534	winfile.exe

C:\> |


kill Command
kill

To kill processes:

Syntax:	kill [-parameter] processID [message]

Switches:

Parameter	Meaning

0	Start Screensaver

1	Close Process

2	Restore Process Window

3	Move Process Window

5	Minimize Process Window

6	Maximize Process Window

7	Send Window Destroy to Process

8	Send Terminate to Process

(Warning:  This may unbalance the Windows operating system.)

9	Close Process

M	Send Command Message to Process

Type kill followed by the process IO number from ps or from jobs

Note: This is a very dangerous command and is only for advanced users.

See Also: ps, jobs

Examples:

C:\> ps

Process	Task ID	Name

-------	-------	------

3852	2342	Kernel

14234	1435	WinCMD

8734	2567	Notepad - README.TXT

25332	2619	Program Manager

3534	1539	File Manager

C:\> kill 8734

C:\> REM The following will call up FORMAT

C:\> kill -M 3534 203

C:\> jobs

Process	Task ID	Name

-------	-------	------

[  1]	1539	File Manager

C:\> kill [1]

Return Code 0: WINFILE.EXE

C:\> |

If no parameters are given the following dialog box will appear and prompt for the wanted information.


logoff Command
logoff

To exit Windows or log off of Windows NT:

Type logoff.

See Also: exit


mem Command
mem

To get the amount of available memory:

Type mem.

Parameters:

DOS Memory Available	Amount of normal memory.

Windows Memory Available	Amount of protected+virtual memory available for windows. (Note: there is not any virtual memory for Standard mode windows.)

Largest Executable Available	Largest Program that may be loaded.

Swapfile	Size of the Windows Swapfile. (386 Enhanced mode only.)

System/GDI Resources	Percentage of System resources available for use. (Device Drivers and Fonts)

User Resources	Percentage of User resources available for use. (Window Creation)

Alias	Size of the alias Stack.

Directory	Size of the Directory Stack from pushd.

Example:

C:\> mem

640K	DOS Memory Available

 7132K/11016K	Windows Memory Available

6908K	Largest Executable Available

7996K	Swapfile

  16%	Free System/GDI Resources

  85%	Free User Resources

  2K	Alias

  5K	Directory Stack

C:\> |


mkdir Command
mkdir/md

To make a new directory:

Syntax:	mkdir newdirectory

Type mkdir followed by the directory to create.

Example:

C:\> mkdir foo

C:\> chdir foo

C:\FOO> |


netadd Command
netadd

Add a Network Drive:

Syntax:	netadd [drive [password] networkconnection]

Type netadd followed by the drive to create, then the password followed by the network connection.

Not typing anything after netadd will automatically call up the default network connect box.

Example:

C:\>  REM This will add the shared Windows directory

C:\> REM on Tom's Machine as drive d:

C:\> netadd d: password \\Tom's Machine\Windows

Connection Successful

C:\> |


netconn Command
netconn

Show All Network Connections:

Windows for Workgroups Only

Syntax:	netconn

Type netconn.

Example:

C:\> netconn

      I: = \\TOMS MACHINE\WINDOWS\SYSTEM

      J: = \\ENGINEERING\ACAD\

      K: = \\ACCOUNTING\LOTUS 123\SAMPLE

C:\> |


netcaps Command
netcaps

Show Network Specifications:

Syntax:	netcaps

Type netcaps.

Example:

C:\> netcaps

Windows for Workgroups Detected

Network Driver Version 3

Network Interface Version 3.16

Network Support Mask 02EF

C:\> |


netfree Command
netfree

Show All Unused Network Connections:

Windows for Workgroups Only

Syntax:	netfree

Type netfree.

Example:

C:\> netfree

      I: = \\TOMS MACHINE\WINDOWS\SYSTEM

      J: = \\ENGINEERING\ACAD\

      K: = \\ACCOUNTING\LOTUS 123\SAMPLE

C:\> |


netlist Command
netlist

List Connected Network Drives:

Syntax:	netlist [drive]

Type netlist followed by the drive to reference.

Example:

C:\>  REM This will list the connected drives and directories

C:\> netlist

      I: = \\TOMS MACHINE\WINDOWS\SYSTEM

      J: = \\ENGINEERING\ACAD\

      K: = \\ACCOUNTING\LOTUS 123\SAMPLE

      Z: = \\NOVELL SERVER\ROOT

C:\> netlist i:

      I: = \\TOMS MACHINE\WINDOWS\SYSTEM

C:\> |


netlogoff Command
netlogoff

Log off of a Network Server:

Syntax:	netlogoff

Type netlogoff.  A Dialog Box will appear and prompt for Server Log Off Parameters.

Example:

C:\> netlogoff

C:\> |


netlogon Command
netlogon

Log on to a Network Server:

Syntax:	netlogon

Type netlogon.  A Dialog Box will appear and prompt for Server Log On Parameters.

Example:

C:\> netlogon

C:\> |


netprivate Command
netprivate

Remove Sharing from a Directory:

Windows for Workgroups Only

Syntax:	netprivate directory

Type netprivate followed by the drectory to share.

Example:

C:\> netprivate C:\WINDOWS

      Share Disconnect Successful

C:\> |


netshare Command
netshare

Share a Directory:

Windows for Workgroups Only

Syntax:	netshare directory

Type netshare followed by the drectory to share.

Example:

C:\> netshare C:\WINDOWS

      Share Successful

C:\> |


netsub Command
netsub

Remove a Network Drive:

Syntax:	netsub [drive]

Type netsub followed by the drive to remove.  The current drive may not be disconnected.

Not typing anything after netsub will automatically call up the default network disconnect box.

Example:

C:\> netsub d:

Disconnect Sucessful

C:\> |


path Command
path

To change the search path.

Syntax:	path=dir[;dir[;dir[...]]]

Type path followed by the new list of directories separated by semicolons (";").

See Also:	set

Example:

C:\> path = C:\WINDOWS;C:\DOS

C:\> |


pause Command
pause

To write "Press any key to continue..." to the screen, and then wait for a key to be pressed:

Type pause.

Example:

C:\> pause

Press any key to continue...


popd Command
popd

To retrieve a directory saved with pushd:

Type popd.

Example:

C:\WINDOWS> pushd

C:\WINDOWS> chdir \dos

C:\DOS> dir

.

.

.

C:\DOS> popd

C:\WINDOWS> |


prompt Command
prompt

To change the command prompt.

Syntax:	prompt=value

Type prompt followed by a variable to change the current prompt.

Switches:

Parameter	Meaning

$p	Current Path

$g	>

$l	<

$b	|

$q	=

$$	$

$h	Delete Last Character

$n	Current Disk Letter

$v	Version Number

$t	Current Time

$d	Current Date

See Also:	set

Example:

C> prompt = $t $p$g

12:00:00 C:\WINDOWS> |


ps Command
ps

To list processes:

Syntax:	ps [/all]

Type ps.

There will be listed several items that are not killable - the WinCMD shell, the desktop, and a few of the hidden windows listed with the /all switch.

Example:

C:\> ps

Process	Task ID	Name

-------	-------	----

1032	312	(Desktop)

3852	2342	Kernel

14234	1435	WinCMD	(this)

25332	2619	Program Manager

C:\> |


pushd Command
pushd

To save the current directory for later retrieval with popd:

Type pushd.

Example:

C:\WINDOWS> pushd

C:\WINDOWS> chdir \dos

C:\DOS> dir

.

.

.

C:\DOS> popd

C:\WINDOWS> |


rename Command
rename/ren

To rename files:

Syntax:	ren[ame] oldfile newfile

Type rename followed by the name of the file to rename, followed by the new name or directory wanted.

Note: Files may be renamed to a new directory similar to the DOS move command.

Example:

C:\> rename oldfile.doc newfile.doc

C:\> |

If no parameters are given the following dialog box will appear and prompt for the wanted information.


replace Command
replace

To replace or add files:

Syntax:	replace source [destination] [/z] [/a] [/u] [/p] [/r]

Type replace followed by the name of the file to copy, followed by the new filename or directory to copy to (optional).

If the Style is set to Verbose, then a window will appear and display the file copy statistics, otherwise it will display the source and destination file names.

If the /z flag is given, replace will automatically decompress the file as it copies using the Liv-Zimpel compression algorythm, if the souce file is compressed using this method.

If the /a flag is given, replace will add the file to the destination directory if it isnt already there.

If the /u flag is given, replace will update the file in the destination directory if it is already there.

If the /p flag is given, replace will prompt before overwriting any files.

If the /r flag is given, replace will overwrite read only files.

See Also: copy, rename, setdos

Note: Wildcards may be used.

Note: The Microsoft COMPRESS utility is compatible with the decompression routines.

Example:

C:\> replace oldfile.doc newfile.doc /a

1 file added.

C:\> |

If no parameters are given the following dialog box will appear and prompt for the wanted information.


rmdir Command
rmdir

To remove a directory:

Syntax:	rmdir directory

Type rmdir followed by the directory to remove.

Note: The directory must be empty in order to be deleted.

Example:

C:\> rmdir foo

C:\> |


set Command
set/unset

To set, clear, and list the environment.

Syntax:	set [item=value]

Type set to list the current settings.

Type set followed by a variable to set to change the current settings.

Type unset followed by a variable to erase  a current setting.

See Also: Path, Prompt

Example:

C:\> set

PATH=C:\;C:\WINDOWS;C:\DOS

PROMPT=$p$g

cmdline=win wincmd

C:\> set cat=dog

C:\> set

PATH=C:\;C:\WINDOWS;C:\DOS

PROMPT=$p$g

cmdline=win wincmd

cat=dog

C:\> |


setdos Command
setdos

To change or list the environment.

Syntax:	setdos [item=value]

Switches:

Parameter	Meaning	Values

Jobs	Job Control	Yes (Show job wait codes)

No (Do not show job wait codes)

Strict	Windows Disk Control	Yes (Do not use non-Windows disk codes)

No (Use non-Windows disk codes)

Style	Message box mode	DOS (Use Screen for Copy, Rename, and Erase)

Verbose (Use Dialog Boxes for Copy, Rename, and Erase)

Toolbar	Toolbar Visability	Yes (Show the Toolbar)

No (Do not show the Toolbar)

Type setdos to list the current settings.

Type setdos followed by a variable to set to change the current settings.

Example:

C:\> setdos

Mode = DOS

Strict = No

Style = Verbose

Toolbar = Yes

C:\> |


ver Command
ver

To get the WinCMD, DOS and Windows version numbers:

Type ver.

Example:

C:\> ver

WinCMD4 Version 4.2 - MS-DOS version 6.20

Windows version 3.11 - 386 Enhanced Mode

Copyright © 1994 By Erik Gawtry

C:\> |


which Command
which

To get the location of a specific command file.

Type which followed by the command.

Example:

C:\> which notepad

C:\WINDOWS\NOTEPAD.EXE

C:\> alias edit notepad

C:\> which edit

C:\WINDOWS\NOTEPAD.EXE

C:\> |